﻿<ResourceDictionary 
    x:Class="Poet.Resources.MenuResources"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="{x:Type MenuItem}">
        <EventSetter Event="PreviewMouseLeftButtonDown" Handler="InvertIsChecked" />
        <EventSetter Event="PreviewMouseDoubleClick" Handler="InvertIsChecked" />
        <EventSetter Event="PreviewMouseLeftButtonUp" Handler="Handle" />
        <EventSetter Event="Click" Handler="Handle" />
        <EventSetter Event="PreviewKeyDown" Handler="HandleKey" />
        <!--<Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEnabled" Value="False"/>
                    <Condition Property="IsChecked" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter Property="Foreground" Value="Black"/>
            </MultiTrigger>
        </Style.Triggers>-->
    </Style>
    
    <Style TargetType="{x:Type Image}">
        <Style.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type MenuItem}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
                <Setter Property="Opacity" Value="0.30" />
            </DataTrigger>      
        </Style.Triggers>
    </Style>

</ResourceDictionary>